/*
Copyright 2016 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// ************************************************************
// DO NOT EDIT.
// THIS FILE IS AUTO-GENERATED BY codecgen.
// ************************************************************

package v1alpha1

import (
	"errors"
	"fmt"
	codec1978 "github.com/ugorji/go/codec"
	pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
	pkg1_v1 "k8s.io/kubernetes/pkg/apis/meta/v1"
	pkg3_types "k8s.io/kubernetes/pkg/types"
	"reflect"
	"runtime"
	time "time"
)

const (
	// ----- content types ----
	codecSelferC_UTF81234 = 1
	codecSelferC_RAW1234  = 0
	// ----- value types used ----
	codecSelferValueTypeArray1234 = 10
	codecSelferValueTypeMap1234   = 9
	// ----- containerStateValues ----
	codecSelfer_containerMapKey1234    = 2
	codecSelfer_containerMapValue1234  = 3
	codecSelfer_containerMapEnd1234    = 4
	codecSelfer_containerArrayElem1234 = 6
	codecSelfer_containerArrayEnd1234  = 7
)

var (
	codecSelferBitsize1234                         = uint8(reflect.TypeOf(uint(0)).Bits())
	codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
)

type codecSelfer1234 struct{}

func init() {
	if codec1978.GenVersion != 5 {
		_, file, _, _ := runtime.Caller(0)
		err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
			5, codec1978.GenVersion, file)
		panic(err)
	}
	if false { // reference the types, but skip this branch at build/run time
		var v0 pkg2_v1.ObjectMeta
		var v1 pkg1_v1.TypeMeta
		var v2 pkg3_types.UID
		var v3 time.Time
		_, _, _, _ = v0, v1, v2, v3
	}
}

func (x *APIServiceList) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym1 := z.EncBinary()
		_ = yym1
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep2 := !z.EncBinary()
			yy2arr2 := z.EncBasicHandle().StructToArray
			var yyq2 [4]bool
			_, _, _ = yysep2, yyq2, yy2arr2
			const yyr2 bool = false
			yyq2[0] = x.Kind != ""
			yyq2[1] = x.APIVersion != ""
			yyq2[2] = true
			var yynn2 int
			if yyr2 || yy2arr2 {
				r.EncodeArrayStart(4)
			} else {
				yynn2 = 1
				for _, b := range yyq2 {
					if b {
						yynn2++
					}
				}
				r.EncodeMapStart(yynn2)
				yynn2 = 0
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq2[0] {
					yym4 := z.EncBinary()
					_ = yym4
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq2[0] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("kind"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym5 := z.EncBinary()
					_ = yym5
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
					}
				}
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq2[1] {
					yym7 := z.EncBinary()
					_ = yym7
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq2[1] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym8 := z.EncBinary()
					_ = yym8
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
					}
				}
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq2[2] {
					yy10 := &x.ListMeta
					yym11 := z.EncBinary()
					_ = yym11
					if false {
					} else if z.HasExtensions() && z.EncExt(yy10) {
					} else {
						z.EncFallback(yy10)
					}
				} else {
					r.EncodeNil()
				}
			} else {
				if yyq2[2] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("metadata"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yy12 := &x.ListMeta
					yym13 := z.EncBinary()
					_ = yym13
					if false {
					} else if z.HasExtensions() && z.EncExt(yy12) {
					} else {
						z.EncFallback(yy12)
					}
				}
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if x.Items == nil {
					r.EncodeNil()
				} else {
					yym15 := z.EncBinary()
					_ = yym15
					if false {
					} else {
						h.encSliceAPIService(([]APIService)(x.Items), e)
					}
				}
			} else {
				z.EncSendContainerState(codecSelfer_containerMapKey1234)
				r.EncodeString(codecSelferC_UTF81234, string("items"))
				z.EncSendContainerState(codecSelfer_containerMapValue1234)
				if x.Items == nil {
					r.EncodeNil()
				} else {
					yym16 := z.EncBinary()
					_ = yym16
					if false {
					} else {
						h.encSliceAPIService(([]APIService)(x.Items), e)
					}
				}
			}
			if yyr2 || yy2arr2 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *APIServiceList) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym17 := z.DecBinary()
	_ = yym17
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct18 := r.ContainerType()
		if yyct18 == codecSelferValueTypeMap1234 {
			yyl18 := r.ReadMapStart()
			if yyl18 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl18, d)
			}
		} else if yyct18 == codecSelferValueTypeArray1234 {
			yyl18 := r.ReadArrayStart()
			if yyl18 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl18, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}

func (x *APIServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys19Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys19Slc
	var yyhl19 bool = l >= 0
	for yyj19 := 0; ; yyj19++ {
		if yyhl19 {
			if yyj19 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys19Slc = r.DecodeBytes(yys19Slc, true, true)
		yys19 := string(yys19Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys19 {
		case "kind":
			if r.TryDecodeAsNil() {
				x.Kind = ""
			} else {
				x.Kind = string(r.DecodeString())
			}
		case "apiVersion":
			if r.TryDecodeAsNil() {
				x.APIVersion = ""
			} else {
				x.APIVersion = string(r.DecodeString())
			}
		case "metadata":
			if r.TryDecodeAsNil() {
				x.ListMeta = pkg1_v1.ListMeta{}
			} else {
				yyv22 := &x.ListMeta
				yym23 := z.DecBinary()
				_ = yym23
				if false {
				} else if z.HasExtensions() && z.DecExt(yyv22) {
				} else {
					z.DecFallback(yyv22, false)
				}
			}
		case "items":
			if r.TryDecodeAsNil() {
				x.Items = nil
			} else {
				yyv24 := &x.Items
				yym25 := z.DecBinary()
				_ = yym25
				if false {
				} else {
					h.decSliceAPIService((*[]APIService)(yyv24), d)
				}
			}
		default:
			z.DecStructFieldNotFound(-1, yys19)
		} // end switch yys19
	} // end for yyj19
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}

func (x *APIServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yyj26 int
	var yyb26 bool
	var yyhl26 bool = l >= 0
	yyj26++
	if yyhl26 {
		yyb26 = yyj26 > l
	} else {
		yyb26 = r.CheckBreak()
	}
	if yyb26 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Kind = ""
	} else {
		x.Kind = string(r.DecodeString())
	}
	yyj26++
	if yyhl26 {
		yyb26 = yyj26 > l
	} else {
		yyb26 = r.CheckBreak()
	}
	if yyb26 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.APIVersion = ""
	} else {
		x.APIVersion = string(r.DecodeString())
	}
	yyj26++
	if yyhl26 {
		yyb26 = yyj26 > l
	} else {
		yyb26 = r.CheckBreak()
	}
	if yyb26 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.ListMeta = pkg1_v1.ListMeta{}
	} else {
		yyv29 := &x.ListMeta
		yym30 := z.DecBinary()
		_ = yym30
		if false {
		} else if z.HasExtensions() && z.DecExt(yyv29) {
		} else {
			z.DecFallback(yyv29, false)
		}
	}
	yyj26++
	if yyhl26 {
		yyb26 = yyj26 > l
	} else {
		yyb26 = r.CheckBreak()
	}
	if yyb26 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Items = nil
	} else {
		yyv31 := &x.Items
		yym32 := z.DecBinary()
		_ = yym32
		if false {
		} else {
			h.decSliceAPIService((*[]APIService)(yyv31), d)
		}
	}
	for {
		yyj26++
		if yyhl26 {
			yyb26 = yyj26 > l
		} else {
			yyb26 = r.CheckBreak()
		}
		if yyb26 {
			break
		}
		z.DecSendContainerState(codecSelfer_containerArrayElem1234)
		z.DecStructFieldNotFound(yyj26-1, "")
	}
	z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x *ServiceReference) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym33 := z.EncBinary()
		_ = yym33
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep34 := !z.EncBinary()
			yy2arr34 := z.EncBasicHandle().StructToArray
			var yyq34 [2]bool
			_, _, _ = yysep34, yyq34, yy2arr34
			const yyr34 bool = false
			yyq34[0] = x.Namespace != ""
			yyq34[1] = x.Name != ""
			var yynn34 int
			if yyr34 || yy2arr34 {
				r.EncodeArrayStart(2)
			} else {
				yynn34 = 0
				for _, b := range yyq34 {
					if b {
						yynn34++
					}
				}
				r.EncodeMapStart(yynn34)
				yynn34 = 0
			}
			if yyr34 || yy2arr34 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq34[0] {
					yym36 := z.EncBinary()
					_ = yym36
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq34[0] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("namespace"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym37 := z.EncBinary()
					_ = yym37
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
					}
				}
			}
			if yyr34 || yy2arr34 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq34[1] {
					yym39 := z.EncBinary()
					_ = yym39
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Name))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq34[1] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("name"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym40 := z.EncBinary()
					_ = yym40
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Name))
					}
				}
			}
			if yyr34 || yy2arr34 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *ServiceReference) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym41 := z.DecBinary()
	_ = yym41
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct42 := r.ContainerType()
		if yyct42 == codecSelferValueTypeMap1234 {
			yyl42 := r.ReadMapStart()
			if yyl42 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl42, d)
			}
		} else if yyct42 == codecSelferValueTypeArray1234 {
			yyl42 := r.ReadArrayStart()
			if yyl42 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl42, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}

func (x *ServiceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys43Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys43Slc
	var yyhl43 bool = l >= 0
	for yyj43 := 0; ; yyj43++ {
		if yyhl43 {
			if yyj43 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys43Slc = r.DecodeBytes(yys43Slc, true, true)
		yys43 := string(yys43Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys43 {
		case "namespace":
			if r.TryDecodeAsNil() {
				x.Namespace = ""
			} else {
				x.Namespace = string(r.DecodeString())
			}
		case "name":
			if r.TryDecodeAsNil() {
				x.Name = ""
			} else {
				x.Name = string(r.DecodeString())
			}
		default:
			z.DecStructFieldNotFound(-1, yys43)
		} // end switch yys43
	} // end for yyj43
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}

func (x *ServiceReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yyj46 int
	var yyb46 bool
	var yyhl46 bool = l >= 0
	yyj46++
	if yyhl46 {
		yyb46 = yyj46 > l
	} else {
		yyb46 = r.CheckBreak()
	}
	if yyb46 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Namespace = ""
	} else {
		x.Namespace = string(r.DecodeString())
	}
	yyj46++
	if yyhl46 {
		yyb46 = yyj46 > l
	} else {
		yyb46 = r.CheckBreak()
	}
	if yyb46 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Name = ""
	} else {
		x.Name = string(r.DecodeString())
	}
	for {
		yyj46++
		if yyhl46 {
			yyb46 = yyj46 > l
		} else {
			yyb46 = r.CheckBreak()
		}
		if yyb46 {
			break
		}
		z.DecSendContainerState(codecSelfer_containerArrayElem1234)
		z.DecStructFieldNotFound(yyj46-1, "")
	}
	z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x *APIServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym49 := z.EncBinary()
		_ = yym49
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep50 := !z.EncBinary()
			yy2arr50 := z.EncBasicHandle().StructToArray
			var yyq50 [6]bool
			_, _, _ = yysep50, yyq50, yy2arr50
			const yyr50 bool = false
			yyq50[1] = x.Group != ""
			yyq50[2] = x.Version != ""
			yyq50[3] = x.InsecureSkipTLSVerify != false
			var yynn50 int
			if yyr50 || yy2arr50 {
				r.EncodeArrayStart(6)
			} else {
				yynn50 = 3
				for _, b := range yyq50 {
					if b {
						yynn50++
					}
				}
				r.EncodeMapStart(yynn50)
				yynn50 = 0
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				yy52 := &x.Service
				yy52.CodecEncodeSelf(e)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapKey1234)
				r.EncodeString(codecSelferC_UTF81234, string("service"))
				z.EncSendContainerState(codecSelfer_containerMapValue1234)
				yy53 := &x.Service
				yy53.CodecEncodeSelf(e)
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq50[1] {
					yym55 := z.EncBinary()
					_ = yym55
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Group))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq50[1] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("group"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym56 := z.EncBinary()
					_ = yym56
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Group))
					}
				}
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq50[2] {
					yym58 := z.EncBinary()
					_ = yym58
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Version))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq50[2] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("version"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym59 := z.EncBinary()
					_ = yym59
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Version))
					}
				}
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq50[3] {
					yym61 := z.EncBinary()
					_ = yym61
					if false {
					} else {
						r.EncodeBool(bool(x.InsecureSkipTLSVerify))
					}
				} else {
					r.EncodeBool(false)
				}
			} else {
				if yyq50[3] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("insecureSkipTLSVerify"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym62 := z.EncBinary()
					_ = yym62
					if false {
					} else {
						r.EncodeBool(bool(x.InsecureSkipTLSVerify))
					}
				}
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if x.CABundle == nil {
					r.EncodeNil()
				} else {
					yym64 := z.EncBinary()
					_ = yym64
					if false {
					} else {
						r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
					}
				}
			} else {
				z.EncSendContainerState(codecSelfer_containerMapKey1234)
				r.EncodeString(codecSelferC_UTF81234, string("caBundle"))
				z.EncSendContainerState(codecSelfer_containerMapValue1234)
				if x.CABundle == nil {
					r.EncodeNil()
				} else {
					yym65 := z.EncBinary()
					_ = yym65
					if false {
					} else {
						r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
					}
				}
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				yym67 := z.EncBinary()
				_ = yym67
				if false {
				} else {
					r.EncodeInt(int64(x.Priority))
				}
			} else {
				z.EncSendContainerState(codecSelfer_containerMapKey1234)
				r.EncodeString(codecSelferC_UTF81234, string("priority"))
				z.EncSendContainerState(codecSelfer_containerMapValue1234)
				yym68 := z.EncBinary()
				_ = yym68
				if false {
				} else {
					r.EncodeInt(int64(x.Priority))
				}
			}
			if yyr50 || yy2arr50 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *APIServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym69 := z.DecBinary()
	_ = yym69
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct70 := r.ContainerType()
		if yyct70 == codecSelferValueTypeMap1234 {
			yyl70 := r.ReadMapStart()
			if yyl70 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl70, d)
			}
		} else if yyct70 == codecSelferValueTypeArray1234 {
			yyl70 := r.ReadArrayStart()
			if yyl70 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl70, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}

func (x *APIServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys71Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys71Slc
	var yyhl71 bool = l >= 0
	for yyj71 := 0; ; yyj71++ {
		if yyhl71 {
			if yyj71 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys71Slc = r.DecodeBytes(yys71Slc, true, true)
		yys71 := string(yys71Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys71 {
		case "service":
			if r.TryDecodeAsNil() {
				x.Service = ServiceReference{}
			} else {
				yyv72 := &x.Service
				yyv72.CodecDecodeSelf(d)
			}
		case "group":
			if r.TryDecodeAsNil() {
				x.Group = ""
			} else {
				x.Group = string(r.DecodeString())
			}
		case "version":
			if r.TryDecodeAsNil() {
				x.Version = ""
			} else {
				x.Version = string(r.DecodeString())
			}
		case "insecureSkipTLSVerify":
			if r.TryDecodeAsNil() {
				x.InsecureSkipTLSVerify = false
			} else {
				x.InsecureSkipTLSVerify = bool(r.DecodeBool())
			}
		case "caBundle":
			if r.TryDecodeAsNil() {
				x.CABundle = nil
			} else {
				yyv76 := &x.CABundle
				yym77 := z.DecBinary()
				_ = yym77
				if false {
				} else {
					*yyv76 = r.DecodeBytes(*(*[]byte)(yyv76), false, false)
				}
			}
		case "priority":
			if r.TryDecodeAsNil() {
				x.Priority = 0
			} else {
				x.Priority = int64(r.DecodeInt(64))
			}
		default:
			z.DecStructFieldNotFound(-1, yys71)
		} // end switch yys71
	} // end for yyj71
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}

func (x *APIServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yyj79 int
	var yyb79 bool
	var yyhl79 bool = l >= 0
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Service = ServiceReference{}
	} else {
		yyv80 := &x.Service
		yyv80.CodecDecodeSelf(d)
	}
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Group = ""
	} else {
		x.Group = string(r.DecodeString())
	}
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Version = ""
	} else {
		x.Version = string(r.DecodeString())
	}
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.InsecureSkipTLSVerify = false
	} else {
		x.InsecureSkipTLSVerify = bool(r.DecodeBool())
	}
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.CABundle = nil
	} else {
		yyv84 := &x.CABundle
		yym85 := z.DecBinary()
		_ = yym85
		if false {
		} else {
			*yyv84 = r.DecodeBytes(*(*[]byte)(yyv84), false, false)
		}
	}
	yyj79++
	if yyhl79 {
		yyb79 = yyj79 > l
	} else {
		yyb79 = r.CheckBreak()
	}
	if yyb79 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Priority = 0
	} else {
		x.Priority = int64(r.DecodeInt(64))
	}
	for {
		yyj79++
		if yyhl79 {
			yyb79 = yyj79 > l
		} else {
			yyb79 = r.CheckBreak()
		}
		if yyb79 {
			break
		}
		z.DecSendContainerState(codecSelfer_containerArrayElem1234)
		z.DecStructFieldNotFound(yyj79-1, "")
	}
	z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x *APIServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym87 := z.EncBinary()
		_ = yym87
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep88 := !z.EncBinary()
			yy2arr88 := z.EncBasicHandle().StructToArray
			var yyq88 [0]bool
			_, _, _ = yysep88, yyq88, yy2arr88
			const yyr88 bool = false
			var yynn88 int
			if yyr88 || yy2arr88 {
				r.EncodeArrayStart(0)
			} else {
				yynn88 = 0
				for _, b := range yyq88 {
					if b {
						yynn88++
					}
				}
				r.EncodeMapStart(yynn88)
				yynn88 = 0
			}
			if yyr88 || yy2arr88 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *APIServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym89 := z.DecBinary()
	_ = yym89
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct90 := r.ContainerType()
		if yyct90 == codecSelferValueTypeMap1234 {
			yyl90 := r.ReadMapStart()
			if yyl90 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl90, d)
			}
		} else if yyct90 == codecSelferValueTypeArray1234 {
			yyl90 := r.ReadArrayStart()
			if yyl90 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl90, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}

func (x *APIServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys91Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys91Slc
	var yyhl91 bool = l >= 0
	for yyj91 := 0; ; yyj91++ {
		if yyhl91 {
			if yyj91 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys91Slc = r.DecodeBytes(yys91Slc, true, true)
		yys91 := string(yys91Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys91 {
		default:
			z.DecStructFieldNotFound(-1, yys91)
		} // end switch yys91
	} // end for yyj91
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}

func (x *APIServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yyj92 int
	var yyb92 bool
	var yyhl92 bool = l >= 0
	for {
		yyj92++
		if yyhl92 {
			yyb92 = yyj92 > l
		} else {
			yyb92 = r.CheckBreak()
		}
		if yyb92 {
			break
		}
		z.DecSendContainerState(codecSelfer_containerArrayElem1234)
		z.DecStructFieldNotFound(yyj92-1, "")
	}
	z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	if x == nil {
		r.EncodeNil()
	} else {
		yym93 := z.EncBinary()
		_ = yym93
		if false {
		} else if z.HasExtensions() && z.EncExt(x) {
		} else {
			yysep94 := !z.EncBinary()
			yy2arr94 := z.EncBasicHandle().StructToArray
			var yyq94 [5]bool
			_, _, _ = yysep94, yyq94, yy2arr94
			const yyr94 bool = false
			yyq94[0] = x.Kind != ""
			yyq94[1] = x.APIVersion != ""
			yyq94[2] = true
			yyq94[3] = true
			yyq94[4] = true
			var yynn94 int
			if yyr94 || yy2arr94 {
				r.EncodeArrayStart(5)
			} else {
				yynn94 = 0
				for _, b := range yyq94 {
					if b {
						yynn94++
					}
				}
				r.EncodeMapStart(yynn94)
				yynn94 = 0
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq94[0] {
					yym96 := z.EncBinary()
					_ = yym96
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq94[0] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("kind"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym97 := z.EncBinary()
					_ = yym97
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
					}
				}
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq94[1] {
					yym99 := z.EncBinary()
					_ = yym99
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
					}
				} else {
					r.EncodeString(codecSelferC_UTF81234, "")
				}
			} else {
				if yyq94[1] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yym100 := z.EncBinary()
					_ = yym100
					if false {
					} else {
						r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
					}
				}
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq94[2] {
					yy102 := &x.ObjectMeta
					yy102.CodecEncodeSelf(e)
				} else {
					r.EncodeNil()
				}
			} else {
				if yyq94[2] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("metadata"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yy103 := &x.ObjectMeta
					yy103.CodecEncodeSelf(e)
				}
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq94[3] {
					yy105 := &x.Spec
					yy105.CodecEncodeSelf(e)
				} else {
					r.EncodeNil()
				}
			} else {
				if yyq94[3] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("spec"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yy106 := &x.Spec
					yy106.CodecEncodeSelf(e)
				}
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayElem1234)
				if yyq94[4] {
					yy108 := &x.Status
					yy108.CodecEncodeSelf(e)
				} else {
					r.EncodeNil()
				}
			} else {
				if yyq94[4] {
					z.EncSendContainerState(codecSelfer_containerMapKey1234)
					r.EncodeString(codecSelferC_UTF81234, string("status"))
					z.EncSendContainerState(codecSelfer_containerMapValue1234)
					yy109 := &x.Status
					yy109.CodecEncodeSelf(e)
				}
			}
			if yyr94 || yy2arr94 {
				z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				z.EncSendContainerState(codecSelfer_containerMapEnd1234)
			}
		}
	}
}

func (x *APIService) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym110 := z.DecBinary()
	_ = yym110
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct111 := r.ContainerType()
		if yyct111 == codecSelferValueTypeMap1234 {
			yyl111 := r.ReadMapStart()
			if yyl111 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl111, d)
			}
		} else if yyct111 == codecSelferValueTypeArray1234 {
			yyl111 := r.ReadArrayStart()
			if yyl111 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl111, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}

func (x *APIService) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys112Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys112Slc
	var yyhl112 bool = l >= 0
	for yyj112 := 0; ; yyj112++ {
		if yyhl112 {
			if yyj112 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys112Slc = r.DecodeBytes(yys112Slc, true, true)
		yys112 := string(yys112Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys112 {
		case "kind":
			if r.TryDecodeAsNil() {
				x.Kind = ""
			} else {
				x.Kind = string(r.DecodeString())
			}
		case "apiVersion":
			if r.TryDecodeAsNil() {
				x.APIVersion = ""
			} else {
				x.APIVersion = string(r.DecodeString())
			}
		case "metadata":
			if r.TryDecodeAsNil() {
				x.ObjectMeta = pkg2_v1.ObjectMeta{}
			} else {
				yyv115 := &x.ObjectMeta
				yyv115.CodecDecodeSelf(d)
			}
		case "spec":
			if r.TryDecodeAsNil() {
				x.Spec = APIServiceSpec{}
			} else {
				yyv116 := &x.Spec
				yyv116.CodecDecodeSelf(d)
			}
		case "status":
			if r.TryDecodeAsNil() {
				x.Status = APIServiceStatus{}
			} else {
				yyv117 := &x.Status
				yyv117.CodecDecodeSelf(d)
			}
		default:
			z.DecStructFieldNotFound(-1, yys112)
		} // end switch yys112
	} // end for yyj112
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}

func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yyj118 int
	var yyb118 bool
	var yyhl118 bool = l >= 0
	yyj118++
	if yyhl118 {
		yyb118 = yyj118 > l
	} else {
		yyb118 = r.CheckBreak()
	}
	if yyb118 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Kind = ""
	} else {
		x.Kind = string(r.DecodeString())
	}
	yyj118++
	if yyhl118 {
		yyb118 = yyj118 > l
	} else {
		yyb118 = r.CheckBreak()
	}
	if yyb118 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.APIVersion = ""
	} else {
		x.APIVersion = string(r.DecodeString())
	}
	yyj118++
	if yyhl118 {
		yyb118 = yyj118 > l
	} else {
		yyb118 = r.CheckBreak()
	}
	if yyb118 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.ObjectMeta = pkg2_v1.ObjectMeta{}
	} else {
		yyv121 := &x.ObjectMeta
		yyv121.CodecDecodeSelf(d)
	}
	yyj118++
	if yyhl118 {
		yyb118 = yyj118 > l
	} else {
		yyb118 = r.CheckBreak()
	}
	if yyb118 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Spec = APIServiceSpec{}
	} else {
		yyv122 := &x.Spec
		yyv122.CodecDecodeSelf(d)
	}
	yyj118++
	if yyhl118 {
		yyb118 = yyj118 > l
	} else {
		yyb118 = r.CheckBreak()
	}
	if yyb118 {
		z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
		return
	}
	z.DecSendContainerState(codecSelfer_containerArrayElem1234)
	if r.TryDecodeAsNil() {
		x.Status = APIServiceStatus{}
	} else {
		yyv123 := &x.Status
		yyv123.CodecDecodeSelf(d)
	}
	for {
		yyj118++
		if yyhl118 {
			yyb118 = yyj118 > l
		} else {
			yyb118 = r.CheckBreak()
		}
		if yyb118 {
			break
		}
		z.DecSendContainerState(codecSelfer_containerArrayElem1234)
		z.DecStructFieldNotFound(yyj118-1, "")
	}
	z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x codecSelfer1234) encSliceAPIService(v []APIService, e *codec1978.Encoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperEncoder(e)
	_, _, _ = h, z, r
	r.EncodeArrayStart(len(v))
	for _, yyv124 := range v {
		z.EncSendContainerState(codecSelfer_containerArrayElem1234)
		yy125 := &yyv124
		yy125.CodecEncodeSelf(e)
	}
	z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
}

func (x codecSelfer1234) decSliceAPIService(v *[]APIService, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r

	yyv126 := *v
	yyh126, yyl126 := z.DecSliceHelperStart()
	var yyc126 bool
	if yyl126 == 0 {
		if yyv126 == nil {
			yyv126 = []APIService{}
			yyc126 = true
		} else if len(yyv126) != 0 {
			yyv126 = yyv126[:0]
			yyc126 = true
		}
	} else if yyl126 > 0 {
		var yyrr126, yyrl126 int
		var yyrt126 bool
		if yyl126 > cap(yyv126) {

			yyrg126 := len(yyv126) > 0
			yyv2126 := yyv126
			yyrl126, yyrt126 = z.DecInferLen(yyl126, z.DecBasicHandle().MaxInitLen, 368)
			if yyrt126 {
				if yyrl126 <= cap(yyv126) {
					yyv126 = yyv126[:yyrl126]
				} else {
					yyv126 = make([]APIService, yyrl126)
				}
			} else {
				yyv126 = make([]APIService, yyrl126)
			}
			yyc126 = true
			yyrr126 = len(yyv126)
			if yyrg126 {
				copy(yyv126, yyv2126)
			}
		} else if yyl126 != len(yyv126) {
			yyv126 = yyv126[:yyl126]
			yyc126 = true
		}
		yyj126 := 0
		for ; yyj126 < yyrr126; yyj126++ {
			yyh126.ElemContainerState(yyj126)
			if r.TryDecodeAsNil() {
				yyv126[yyj126] = APIService{}
			} else {
				yyv127 := &yyv126[yyj126]
				yyv127.CodecDecodeSelf(d)
			}

		}
		if yyrt126 {
			for ; yyj126 < yyl126; yyj126++ {
				yyv126 = append(yyv126, APIService{})
				yyh126.ElemContainerState(yyj126)
				if r.TryDecodeAsNil() {
					yyv126[yyj126] = APIService{}
				} else {
					yyv128 := &yyv126[yyj126]
					yyv128.CodecDecodeSelf(d)
				}

			}
		}

	} else {
		yyj126 := 0
		for ; !r.CheckBreak(); yyj126++ {

			if yyj126 >= len(yyv126) {
				yyv126 = append(yyv126, APIService{}) // var yyz126 APIService
				yyc126 = true
			}
			yyh126.ElemContainerState(yyj126)
			if yyj126 < len(yyv126) {
				if r.TryDecodeAsNil() {
					yyv126[yyj126] = APIService{}
				} else {
					yyv129 := &yyv126[yyj126]
					yyv129.CodecDecodeSelf(d)
				}

			} else {
				z.DecSwallow()
			}

		}
		if yyj126 < len(yyv126) {
			yyv126 = yyv126[:yyj126]
			yyc126 = true
		} else if yyj126 == 0 && yyv126 == nil {
			yyv126 = []APIService{}
			yyc126 = true
		}
	}
	yyh126.End()
	if yyc126 {
		*v = yyv126
	}
}
